<?php
	ob_flush();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Central Cell</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="../css/main.css" media="all" />
<!--[if IE 6]><link type="text/css" rel="stylesheet" href="css/ie6.css" media="all" /><![endif]-->
<script type="text/javascript" src="../js/mootools.js"></script>
<script type="text/javascript" src="../js/site.js"></script>
<script type="text/javascript" src="../js/validateform.js"></script>
</head>
<body>
<div id="wrapper">
  <div id="container">
     <?php require_once('header.php') ?>
    <div id="content">
      <div id="col_left">
        <div class="post">
          <div class="meta">
            <div class="date">
			<?php $d=getdate() ?>
              <div class="month"><?php echo $d['month']; ?></div>
              <div class="day"><?php echo $d['mday']; ?></div>
            </div>
            <a class="title" href="#">Selamat Belanja</a> 
            <div class="clear"></div>
          </div>
          <div class="body">
            <h1>Centra Cell</h1>

            <blockquote>
              <p><marquee>" Selalu Siap Sedia Memenuhi Kebutuhan Anda "</marquee></p>
            </blockquote>
          </div>
          <div class="comments">
            <div class="comment">
		<br /><p>
				<?php
				require_once('../konek.php'); 
				$uname=$_GET['uname'];
				if ($status == 'berhasil') {
					$str_query = "SELECT * FROM anggota WHERE u_name ='" . $uname . "'";
					$run_query = mysql_query($str_query);
					$num_query = mysql_num_rows($run_query);
		
					if ($num_query == 1) {
						$rec = mysql_fetch_array($run_query);
				?>
					<table class="table">
					<tr>
						<td>Username</td>
						<td>: <?php echo $rec[0]?></td>
					</tr>
					<tr>
						<td>Nama Lengkap</td>
						<td>: <?php echo $rec[2]?></td>
					</tr>
					<tr>
						<td>Tanggal Lahir</td>
						<td>: 
							<select name="input5" class="text">
							
							<?php 
							$potong_tgl=substr($rec[3],8,2);
							for ($a=1; $a<32; $a++) {
								if ($a == $potong_tgl) {
									$select = "selected";
								} else {
									$select = "";
								}
							?>
								<option value="<?php echo $a; ?>" <?php echo $select; ?>><?php echo $a; ?></option>
							<?php } ?>
							</select>
							<select name="input6" class="text">
							<?php 
							$arr_bulan = array("Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des");
							$jml_array = count($arr_bulan);
							$trim_bln = substr($rec[3],5,2);
							for ($a=0; $a<$jml_array; $a++) {
								if ($a+1 == $trim_bln) {
									$select = "selected";
								} else {
									$select = "";
								}
							?>
								<option value="<?php echo $a+1; ?>" <?php echo $select; ?>><?php echo $arr_bulan[$a]; ?></option>
							<?php } ?>
							</select>
							<select name="input7" class="text">
							<?php
							$trim_thn = substr($rec[3],0,4);
							 for ($a=1985; $a<=date('Y'); $a++) { 					 
								if ($a == 1986) {
									$select = "selected";
								} else {
									$select = "";
								}
							 ?>
								<option value="<?php echo $a; ?>" <?php echo $select; ?>><?php echo $a; ?></option>
							<?php } ?>
							</select>
						</td>
					</tr>
					<tr>
						<td>Kota Lahir</td>
						<td>: <?php echo $rec[4]?></td>
					</tr>
					<tr>
						<td>Alamat Rumah</td>
						<td>: <?php echo $rec[5]?></td>
					</tr>
					<tr>
						<td>No Telephone</td>
						<td>: <?php echo $rec[6]?></td>
					</tr>
					<tr>
						<td>E-Mail</td>
						<td>: <?php echo $rec[7]?></td>
					</tr>
					</table>
					<br /><br /><p class="table">
					Untuk melakukan per-ubahan data (edit) apabila ada data yang tidak cocok atau tidak sesuai, Anda diwajibkan untuk <i>Log-in</i> terlebih dahulu dengan memasukkan
					<em>username</em> dan <em>password</em> anda pada menu <a href="../index.php">Log-in</a> yang ada disebelah kiri.
					</p>
					<br>
				<?php 
					}
					}
				?>
				</p>
			</div>	
            </div>
           
            
          </div>
        </div>
      </div>
      <div id="col_right">
	 <div id="col_right"> 
	<?php require_once('menu_right.php') ?>
        
  <?php require_once('footer.php') ?>
  </div>
</div>
</body>
</html>
<?php ob_end_flush() ?>